package com.weasing.res.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.weasing.res.dao.IWxRoleDao;
import com.weasing.res.domain.WxRole;
import com.weasing.res.service.IWxRoleService;
import com.weasing.res.service.base.impl.BaseServiceImpl;

@Service
@Transactional
public class WxRoleServiceImpl extends BaseServiceImpl<WxRole>
		implements IWxRoleService {
	@Autowired
	private IWxRoleDao wxRoleDao;

	/**
	 * 通过rolename找对象 用作判断重复角色
	 * 
	 * @return 可以用 true 重复不可用 false
	 */

	@Override
	public WxRole checkUserName(String username) {

		WxRole wxRole = wxRoleDao.findUserByUsername(username);
		return wxRole;
	}
}
